package com.espier.t9keyboard;

import java.io.Serializable;


import android.provider.CallLog;
import android.util.Log;


public class MyCallLog implements Serializable{

	private static final long serialVersionUID = 1961776759447132658L;
	
	private Integer _ID;
	private String name;
	private String number;
	private Long callDate;
	private Integer type=-1;
	private Integer duration;
	private Integer phoneId;
	private Integer contactId;
	
	private int callTypeResId; 
	private String callDateStr;
	
	public Integer get_ID() {
		return _ID;
	}
	public void set_ID(Integer _ID) {
		this._ID = _ID;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getNumber() {
		return number;
	}
	public void setNumber(String number) {
		this.number = number;
	}
	public Long getCallDate() {
		return callDate;
	}
	public void setCallDate(Long callDate) {
		this.callDate = callDate;
	}
	
	public String getCallDateStr() {
		return callDateStr;
	}
	
	
	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	public int getCallTypeResId() {
		switch (this.type) {
		case CallLog.Calls.INCOMING_TYPE:
			callTypeResId=R.string.calllog_incoming_type;
			break;
		case CallLog.Calls.OUTGOING_TYPE:
			callTypeResId=R.string.calllog_outgoing_type;
			break;
		case CallLog.Calls.MISSED_TYPE:
			callTypeResId=R.string.calllog_missed_type;
			break;
//		case CallLog.Calls.VOICEMAIL_TYPE:
//			callTypeResId=R.string.calllog_voicemail_type;
//			break;
		default:
			callTypeResId=R.string.calllog_missed_type;
			break;
		}
		return callTypeResId;
	}

	public Integer getDuration() {
		return duration;
	}
	public void setDuration(Integer duration) {
		this.duration = duration;
	}
	public Integer getPhoneId() {
		return phoneId;
	}
	public void setPhoneId(Integer phoneId) {
		this.phoneId = phoneId;
	}
	public Integer getContactId() {
		return contactId;
	}
	public void setContactId(Integer contactId) {
		this.contactId = contactId;
	}
	
}
